require 'career'

def career
	careers = []
	id = 1;
	CAREERS.each do |career|
		careers << "static int #{career[:name]}Id() { return #{id}; }"
		careers << "static const ut::String& #{career[:name]}Name()"
		careers << "{"
		careers << "\tstatic ut::String name = _T(\"#{career[:chiness_name]}\");"
		careers << "\treturn name;"
		careers << "}"
		id += 1
	end
	return careers.join("\n\t\t\t")
end

File.open('templates/career_template', 'r') do |read_file|
	write_file = File.new('out/Career.h', 'w')
	while line = read_file.gets
		line.gsub!(/\$\(career\)/, career)
		write_file.puts line
	end
	write_file.close
end
